//
//  PAWFLoadingSwitch.h
//  PAWFLoadingSwitch
//
//  Created by lixinxing on 16/6/23.
//  Copyright © 2016年 Ping An Insurance(Group) Company of China, Ltd. All rights reserved.
//

#import <UIKit/UIKit.h>
@class PAWFLoadingSwitch;


typedef NS_ENUM(NSInteger, PAWFLoadingSwitchType) {
    /*! 关闭状态 */
    PAWFLoadingSwitchOff = 0,
    /*! 加载中状态 */
    PAWFLoadingSwitchLoading,
    /*! 打开状态 */
    PAWFLoadingSwitchOn,
};

typedef void(^PAWFLoadingSwitchClick) (PAWFLoadingSwitch * loadingSwitch, PAWFLoadingSwitchType curType);

@interface PAWFLoadingSwitch : UIControl

/*! 设定及获取当前的状态类型 */
@property (assign, nonatomic) PAWFLoadingSwitchType switchType;

/**
 *  点击控件的block回调, 可以根据当前的状态做相关操作.
 *
 *  @param clickBlock 回调
 */
- (void) handleSwithClick:(PAWFLoadingSwitchClick)clickBlock;


@end
